<?php
namespace app\validate;

use think\Validate;

class BbsTypeValidate extends Validate
{

    protected $rule = [
        'id'      => 'require',
        'type_pic'       => 'require',
        'type_name'      => 'require',
        'type_tags'      => 'require',
        'type_desc'      => 'require',
        'type_status'    => 'require',
        'type_class'      => 'require',
    ];
    
    protected $message           = [
        'id.require'     => '圈子ID有误',
        'type_pic.require'     => '请上传圈子图片',
        'type_name.require'    => '请输入圈子名称',
        'type_tags.require'    => '请输入圈子标签',
        'type_desc.require'    => '请输入圈子简介',
        'type_status.require'  => '请选择圈子状态',
        'type_class.require'    => '请选择圈子类型',
    ];
    
    protected $scene = [
        # 新建
        'add' => ['type_pic', 'type_name', 'type_tags', 'type_desc', 'type_status', 'type_class'],

        # 编辑
        'edit' => ['id', 'type_pic', 'type_name', 'type_tags', 'type_desc', 'type_status', 'type_class'],
    ];
}